<?php
namespace app\common\model;

class Menu extends Base
{
    protected $name = 'menu';

    /* 获取器 */
    public function getRuleAttr($val){
        return config('app.url') . $val;
    }

    public function getPidAttr($val){
        return $this->getVal(['id' => $val], 'name')['data'];
    }
}